import Vue from 'vue';
import Router from 'vue-router';

import HelloWorld from '@/views/HelloWorld.vue';
import World from '@/views/World.vue';
import Content from '@/views/Content.vue';
import Media from '@/views/Media.vue';
import DataReport from '@/views/DataReport.vue';
Vue.use(Router);

const router = new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: HelloWorld,
    },
    {
      path: '/world',
      name: 'World',
      component: World,
      beforeEnter: (to, from, next) => {
        console.log('Entering World route');
        next();
      },
    },
    {
      path: '/content',
      name: 'content',
      component: Content,
    },
    {
      path: '/media',
      name: 'media',
      component: Media,
    },
    {
      path: '/datareport',
      name: 'datareport',
      component: DataReport,
    },
  ],
});
router.beforeEach((to, from, next) => {
  next();
});
export default router;
